package ch.abcm.remsmobile.REMSMobile.orm.model;

import ch.bfh.abcm.rems.sensors.tinkerforge.TFSensorType;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(tableName = "systemState")
public class SystemState {

	public enum State {
		SYSTEM_ERROR, MEASUREMENT_DIVERGENCE, SYSTEM_OK
	}

	@DatabaseField(generatedId = true)
	int id;
	@DatabaseField
	State systemState;
	@DatabaseField
	TFSensorType sensorType;

	public SystemState() {

	}

	public SystemState(State systemState, TFSensorType sensorType) {
		this.systemState = systemState;
		this.sensorType = sensorType;
	}

	public State getSystemState() {
		return systemState;
	}

	public void setSystemState(State systemState) {
		this.systemState = systemState;
	}

	public TFSensorType getSensorType() {
		return sensorType;
	}

	public void setSensorType(TFSensorType sensorType) {
		this.sensorType = sensorType;
	}

	@Override
	public String toString() {
		return "SystemState [id=" + id + ", systemState=" + systemState + ", sensorType=" + sensorType + "]";
	}
}
